﻿using Common.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Common.EF.Map
{
    public class TreeEntityBaseMap<T> : EntityBaseMap<T> where T : TreeEntityBase
    {
        public override void Configure(EntityTypeBuilder<T> builder)
        {
            base.Configure(builder);
            builder.Property(t => t.parent_id).HasMaxLength(50);
            builder.Property(t => t.is_leaf);
        }
    }
}
